/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-22 12:01:46
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-22 13:31:49
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/components/animation_text.dart';
import 'package:flutter_data_center/controller/visitor_controller.dart';
import 'package:flutter_data_center/utills/color_utils.dart';
import 'package:get/get.dart';

class VisitorCount extends StatelessWidget {
  const VisitorCount({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => GetBuilder<VisitorController>(
        builder: (_controller) => Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            AnimText(
              number: _controller.total,
              style: TextStyle(
                fontSize: 48,
                fontWeight: FontWeight.w700,
              ),
            ),
            SizedBox(width: 16),
            Text(
              "人",
              style: TextStyle(
                fontSize: 24,
                height: 2.5,
              ),
            ),
            Spacer(),
            Container(
              width: 40,
              height: 40,
              decoration: BoxDecoration(
                color: gColor("#DAFDFF"),
                borderRadius: BorderRadius.circular(10),
              ),
              child: Icon(
                Icons.person_add,
                color: gColor("#00D5E1"),
              ),
            ),
          ],
        ),
      );
}
